package singleton;

/**
 * 懒汉式
 * @author zhangxi
 * @date 2021/1/12
 */
public class LazySingle {

    private LazySingle() {
    }

    private static LazySingle lazySingle = null;

    public synchronized static LazySingle getInstance() {
        if (lazySingle == null) {
            lazySingle = new LazySingle();
        }
        return lazySingle;
    }
}
